<?php

namespace paper\component;

use paper\http\Request;
use paper\http\response\Response;

abstract class Middleware implements \paper\constraint\Middleware
{

//    private \Closure $next;
//
//    public function __construct(\Closure $next)
//    {
//        $this->next = $next;
//    }

//    protected function next(): Response
//    {
//        return call_user_func($this->next);
//    }

    abstract function onBoot(Request $request,\Closure $next): Response;
}